package com.tianqi.modules.pms.controller;

import com.tianqi.common.api.CommonResult;
import com.tianqi.modules.pms.dto.request.ArrangeDiskReqDTO;
import com.tianqi.modules.pms.dto.response.ziwei.ZiWeiDouShuResp;
import com.tianqi.modules.pms.service.ZiWeiDouShuService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * 紫微斗数排盘相关接口
 *
 * @author zhangzedi
 * @date 2023/8/24 00:11
 **/
@RestController
@RequestMapping("/pms/zwds")
public class ZiWeiDouShuController {

	@Autowired
	private ZiWeiDouShuService ziWeiDouShuService;

	@PostMapping("/query")
	@ApiOperation("获取紫微斗数接口")
	public CommonResult<ZiWeiDouShuResp> getZiWeiDouShu(@RequestBody @Valid ArrangeDiskReqDTO reqDTO) {
		return CommonResult.success(ziWeiDouShuService.getZiWeiDouShu(reqDTO));
	}
}
